﻿@{
    ViewBag.Title = "打分方式";
}
@section header{

}
<form id="form1">
    <div class="form-layout">
        <input type="hidden" name="ID" value="" />
        <input type="hidden" id="OrderBy" name="OrderBy" value="" />
        <input type="hidden" id="AddTime" name="AddTime" value="" />
        <table class="form">

            <tr>
                <th class="formTitle">名称</th>
                <td class="formValue">
                    <input id="SmName" name="SmName" type="text" class="form-control " autocomplete="off" />
                </td>
            </tr>

            <tr>
                <th class="formTitle">是否下拉选择</th>
                <td class="formValue">
                    <input id="IsChoose" name="IsChoose" type="text" class="form-control " autocomplete="off" />
                </td>
            </tr>

            <tr>
                <th class="formTitle">最大分</th>
                <td class="formValue">
                    <input id="MaxScore" name="MaxScore" type="text" class="form-control " autocomplete="off" />
                </td>
            </tr>

            <tr>
                <th class="formTitle">最低分</th>
                <td class="formValue">
                    <input id="MinScore" name="MinScore" type="text" class="form-control " autocomplete="off" />
                </td>
            </tr>

            <tr>
                <th class="formTitle">下拉选择项设置</th>
                <td class="formValue">
                    <input id="ChooseSource" name="ChooseSource" type="text" class="form-control " autocomplete="off" />
                </td>
            </tr>



        </table>
    </div>
</form>

@section scripts{
    <script>
        var baseUrl = "/Assess/PerfScoreModel/";
        var keyValue = $.request("keyValue");
        $(function () {
            initControl();
            if (!!keyValue) {
                $.ajax({
                    url: baseUrl + "GetFormJson",
                    data: { keyValue: keyValue },
                    dataType: "json",
                    async: false,
                    success: function (data) {
                        $("#form1").formSerialize(data);
                    }
                });
            }
        });
        function initControl() {

        }
        function submitForm() {
            if (!$('#form1').formValid()) {
                return false;
            }
            $.submitForm({
                url: baseUrl + "SubmitForm?keyValue=" + keyValue,
                param: $("#form1").formSerialize(),
                success: function () {
                    $.currentWindow().$("#gridList").resetSelection();
                    $.currentWindow().$("#gridList").trigger("reloadGrid");
                }
            })
        }
    </script>
}